Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make write call save #117

Merged
merged 7 commits into from
Nov 17, 2023
Merged

Make write call save #117

merged 7 commits into from
Nov 17, 2023

Conversation

ManonMarchand
Copy link
Member

@ManonMarchand ManonMarchand commented Nov 15, 2023

What the PR does:

(I mixed my commits so this PR does way too much)

  • add the n_cells method to each MOC type
>>> from mocpy import MOC
>>> MOC.n_cells(0)
12
>>> from mocpy import STMOC
>>> STMOC.n_cells(0, dimension='space')
12
  • adds a new file to test abstract moc and remove duplicated save tests
  • the mocpy.stmoc.STMOC.from_spatial_coverages now also accepts non iterable objects (prevents from having to wrap a single moc in a list each time it's used)
  • fixed a warning in the notebooks because of max_norder argument that was introduced in a former version
  • makes the write function call save internally [Make deprecated write call save #114 ]
  • save now accepts fits_keywords to be added to the header (was needed to keep all of write functionalities)

@ManonMarchand ManonMarchand marked this pull request as draft November 15, 2023 17:02
this add the fits_keywords argument to the new save function so that the functionnalities are maintained. This PR also adds a test_abstract_moc file that tests the save method for all moc types.
@ManonMarchand ManonMarchand marked this pull request as ready for review November 16, 2023 09:01
@ManonMarchand ManonMarchand merged commit 364618d into master Nov 17, 2023
14 checks passed
@ManonMarchand ManonMarchand deleted the make-write-call-save branch November 17, 2023 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant